import request from '@/utils/request'

// 创建活动核销记录
export function createActivityWrite(data) {
  return request({
    url: '/dt/activity-write/create',
    method: 'post',
    data: data
  })
}

// 更新活动核销记录
export function updateActivityWrite(data) {
  return request({
    url: '/dt/activity-write/update',
    method: 'put',
    data: data
  })
}

// 删除活动核销记录
export function deleteActivityWrite(id) {
  return request({
    url: '/dt/activity-write/delete?id=' + id,
    method: 'delete'
  })
}

// 获得活动核销记录
export function getActivityWrite(id) {
  return request({
    url: '/dt/activity-write/get?id=' + id,
    method: 'get'
  })
}

// 获得活动核销记录分页
export function getActivityWritePage(query) {
  return request({
    url: '/dt/activity-write/page',
    method: 'get',
    params: query
  })
}

// 导出活动核销记录 Excel
export function exportActivityWriteExcel(query) {
  return request({
    url: '/dt/activity-write/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
